#include <iostream>
using namespace std;
int main(){
    //收银台程序
    cout<<"请输入商品数量:(整数)"<<endl;
    int count; // 数量
    cin>>count;
    cout<<"请输入商品单价（￥）"<<endl;
    double price; //单价
    cin>>price;
    // 计算出消费金额  数量*单价
    double money = count * price;
    //消费总额满1000元，即可享受9折支付
    if(money >= 1000){
        cout<<"恭喜你消费满1000元了，享受9折支付"<<endl;
        //money = money*0.9;
        money*=0.9;  // 打九折
    }
    cout<<"你的消费金额为"<<money<<"元"<<endl;
    //实付金额
    cout<<"请输入实付金额(￥)"<<endl;
    double pay;
    cin>>pay;
    if(pay>=money){
        //结算并找零
        double change = pay-money;
        cout<<"结算完成，找零"<<change<<"元"<<endl;
    }else{
        cout<<"兄弟给少了！"<<endl;
    }
    return 0;
}